<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
	<head>
		<title>Редактироване контакта ${person.getId()}</title>
		<LINK rel="stylesheet" type="text/css" href="/PersonWeb/css/styles.css">
	</head>
	<body>
		<table border="0" align=center>
		<tr>
			<td width=160 valign="top">
				Контакты <div style="text-align: center"> ver 0.2</div>
				<br>
				<div> 
					<a href="/PersonWeb/newPerson.htm">
					<img border="0" src="/PersonWeb/images/new.gif">
					</a>
				</div>
				<p>&nbsp;</p>
				<p>&nbsp;</p>
				<div class="info">Резюме: <ul>
					<li>Spring v3 MVC</li>
					<li>TomCat 7</li>
					<li>DAO H2</li>
				</div>
			</td>
		<td>
		<p></p>
		<form:form method="POST" commandName="person">
		<table border="0" cellspacing="0" bordercolor=#000000 bgcolor=#F3F3FC align=center>
			<tr> 
				<td class="fieldName"> ID </td>
				<td class="fieldData">
					<form:input path="id" />
				</td>
			</tr>
			<tr> 
				<td class="fieldName"> Имя </td>
				<td class="fieldData">
					<form:input path="fistname" />
				</td>
			</tr>
			<tr> 			 
				<td class="fieldName" > Фамилия </td>
				<td class="fieldData">
					<form:input path="surname" />
				</td>
			</tr>
			<tr> 
				<td class="fieldName"> Возраст </td>
				<td class="fieldData">
					<form:input path="age" />
				</td>
			</tr> 
			<c:forEach items="${person.getPhone()}" varStatus="counter">
			<tr> 
				<td class="fieldName"> Телефон </td>
				<td class="fieldData"> 
					<form:input path="phone[${counter.index}].phone" />
				</td>
			</tr>
			</c:forEach> 
			<tr > 
				<td colspan="2"> 
					<div class="personid">Контакт ${person.getId()}</div>
					<div style="text-align: center; height:40">			
						<input type="image" src="/PersonWeb/images/save.gif" value="submit">
						<a href="/PersonWeb/index.htm">
							<img border="0" src="/PersonWeb/images/cancel.gif">
						</a>
					</div>
				</td>
			</tr>
			</table>
				</form:form>
			</td>
		</tr>
	</table>
	<br>
	
	


	</body>
</html>